package com.yuerlive.rainbow.entity;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

/**
 * Created by xiaoyi on 2016/9/23.
 */
public class Gift implements Parcelable {
    @SerializedName("count_down")
    private String countDown;
    @SerializedName(value = "id", alternate = {"giftId"})
    private int id;
    private int choosed;
    private String name;
    private String icon;
    private long startTime;
    private int doubleHitNum ;
    private String senderIcon; //发送礼物人的头像

    public String getSenderIcon() {
        return senderIcon;
    }

    public void setSenderIcon(String senderIcon) {
        this.senderIcon = senderIcon;
    }

    public static Creator<Gift> getCREATOR() {
        return CREATOR;
    }

    @SerializedName("gift_rainbow_sweet")

    private int giftRainbowSweet;

    public int getGiftRainbowSweet() {
        return giftRainbowSweet;
    }

    public void setGiftRainbowSweet(int giftRainbowSweet) {
        this.giftRainbowSweet = giftRainbowSweet;
    }

    public int getDoubleHitNum() {
        return doubleHitNum;
    }

    public void setDoubleHitNum(int doubleHitNum) {
        this.doubleHitNum = doubleHitNum;
    }

    public long getStartTime() {
        return startTime;
    }

    public void setStartTime(long startTime) {
        this.startTime = startTime;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    private String userAvatar;

    public String getUserAvatar() {
        return userAvatar;
    }

    public void setUserAvatar(String userAvatar) {
        this.userAvatar = userAvatar;
    }

    private String bait;
    @SerializedName("yuer_coin")
    private String yuerCoin;
    private int num;

    private String userId;

    public String getUserId() {
        return userId;
    }

    private String fromNick;

    private int type;

    public String getFromNick() {
        return fromNick;
    }

    public void setFromNick(String fromNick) {
        this.fromNick = fromNick;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }


    @SerializedName("no_frame_icon")
    private String noFrameIcon;

    public String getNoFrameIcon() {
        return noFrameIcon;
    }

    public void setNoFrameIcon(String noFrameIcon) {
        this.noFrameIcon = noFrameIcon;
    }

    public String getYuerCoin() {
        return yuerCoin;
    }

    public void setYuerCoin(String yuerCoin) {
        this.yuerCoin = yuerCoin;
    }

    public String getBait() {
        return bait;
    }

    public void setBait(String bait) {
        this.bait = bait;
    }


    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public int getChoosed() {
        return choosed;
    }

    public void setChoosed(int choosed) {
        this.choosed = choosed;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getCountDown() {
        return countDown;
    }

    public void setCountDown(String countDown) {
        this.countDown = countDown;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.id);
        dest.writeString(this.name);
        dest.writeString(this.icon);
        dest.writeString(this.bait);
        dest.writeString(this.yuerCoin);
        dest.writeInt(this.num);
        dest.writeInt(this.choosed);
        dest.writeString(this.countDown);
        dest.writeString(this.noFrameIcon);
        dest.writeString(this.userId);
        dest.writeString(this.userAvatar);
        dest.writeString(this.fromNick);
        dest.writeInt(this.type);
        dest.writeLong(this.startTime);
        dest.writeInt(this.doubleHitNum);
        dest.writeInt(this.giftRainbowSweet);
        dest.writeString(this.senderIcon);
    }

    public Gift() {
    }

    protected Gift(Parcel in) {
        this.id = in.readInt();
        this.name = in.readString();
        this.icon = in.readString();
        this.bait = in.readString();
        this.yuerCoin = in.readString();
        this.num = in.readInt();
        this.choosed = in.readInt();
        this.countDown = in.readString();
        this.noFrameIcon = in.readString();
        this.userId = in.readString();
        this.userAvatar = in.readString();
        this.fromNick = in.readString();
        this.type = in.readInt();
        this.startTime = in.readLong();
        this.doubleHitNum = in.readInt();
        this.giftRainbowSweet = in.readInt();
        this.senderIcon = in.readString();
    }

    public static final Parcelable.Creator<Gift> CREATOR = new Parcelable.Creator<Gift>() {
        @Override
        public Gift createFromParcel(Parcel source) {
            return new Gift(source);
        }

        @Override
        public Gift[] newArray(int size) {
            return new Gift[size];
        }
    };
}
